<template>
  <el-row class="newslist">
    <ul class="classlist">
      <template v-for="(item, index) in news">
        <el-divider v-if="index !== 0" :key="index"></el-divider>
        <newsItem :key="index" :item="item" class="classlist__item" />
      </template>
    </ul>
  </el-row>
</template>

<script>
import NewsItem from '../public/NewsItem'
export default {
  components: { NewsItem },
  props: {
    news: {
      type: Array,
      default: () => {
        return []
      }
    },
    addNews: {
      type: Function,
      default: () => {}
    }
  },
  data() {
    return {
      isloading: false
    }
  }
}
</script>

<style lang="scss" scoped>
$--h: 50px;
.newslist {
  margin: 20px auto;
  border-radius: 4px;
  width: $--typeArea;
  background-color: #fff;
  .classlist {
    width: 100%;
    background: #fff;
    & li {
      height: 160px;
      width: 100%;
    }
  }
}
/deep/ .el-divider--horizontal {
  margin: 0;
}
</style>
